function Tab(el)
{
    this.el = document.querySelector(el)
    this.init()
}
Tab.prototype.init=function()
{
    this.titleChange()
}
Tab.prototype.titleChange=function()
{

   let ulLiObjs = this.el.querySelectorAll('ul li')
   ulLiObjs.forEach((item,i)=>
   {
        item.onmouseover=()=>
        {
            this.el.querySelector('ul li.active').className=''
            ulLiObjs[i].className='active'
            this.changeContent(i)//传实参 i 给函数
        }
   })
   Tab.prototype.changeContent=function(i)
   {
        this.el.querySelector('ol li.active').className=''
        this.el.querySelectorAll('ol li')[i].className='active'
   }
}